import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/anchor_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class AnchorEntity {
	late int code;
	late String msg;
	 List<AnchorData> data =[];

	AnchorEntity();

	factory AnchorEntity.fromJson(Map<String, dynamic> json) => $AnchorEntityFromJson(json);

	Map<String, dynamic> toJson() => $AnchorEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AnchorData {
	@JSONField(name: "anchor_name")
	late String anchorName;
	late String platform;
	late String roomId;
	@JSONField(name: "open_url")
	late String openUrl;
	@JSONField(name: "img_url")
	late String imgUrl;

	AnchorData();

	factory AnchorData.fromJson(Map<String, dynamic> json) => $AnchorDataFromJson(json);

	Map<String, dynamic> toJson() => $AnchorDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}